version: '3'

services:
  {{ service_name }}:
    image: mobox/experiment-service:latest  # 替换为实际使用的Docker镜像
    container_name: {{ service_name }}
    ports:
      - "{{ port }}:80"  # 映射内部80端口到外部指定端口
    volumes:
      - {{ course_files_path }}:/app/course_files
      - {{ user_dir }}/data:/app/user_data
    environment:
      - USER_ID={{ user_id }}
      - EXPERIMENT_ID={{ experiment_id }}
      - COURSE_TYPE={{ course_type }}
      - RECORD_PROGRESS={{ "true" if record_progress else "false" }}
    restart: unless-stopped
    networks:
      - mobox_network

networks:
  mobox_network:
    driver: bridge 